﻿// Action script...

// [Initial MovieClip Action of sprite 399]
#initclip 4
class gs.TweenFilterLite extends gs.TweenLite
{
    var vars, _originalEase, _timeScale, delay, initTime, startTime, endTargetID, _clrsa, _filters, _matrix, target, _cmf, _endMatrix, tweens, duration, _hst, _subTweens, _hasUpdate, complete, __get__timeScale, __set__timeScale;
    static var __get__globalTimeScale, __set__globalTimeScale;
    function TweenFilterLite($target, $duration, $vars)
    {
        super($target, $duration, $vars);
        _originalEase = vars.ease;
        _timeScale = _timeScale * gs.TweenFilterLite._globalTimeScale;
        if (_timeScale != 1 && delay != 0)
        {
            startTime = initTime + delay * (1000 / _timeScale);
        } // end if
        if (gs.TweenLite.version < 8.160000)
        {
            trace ("TweenFilterLite error: Please update your TweenLite class or try clearing your ASO files. TweenFilterLite requires a more recent version. Download updates at http://www.TweenLite.com.");
        } // end if
        if ($vars.type != undefined)
        {
            trace ("TweenFilterLite warning: " + $target + " appears to be using deprecated syntax. Please update to the new syntax. See http://www.TweenFilterLite.com for details.");
        } // end if
    } // End of the function
    static function to($target, $duration, $vars)
    {
        return (new gs.TweenFilterLite($target, $duration, $vars));
    } // End of the function
    static function from($target, $duration, $vars)
    {
        $vars.runBackwards = true;
        return (new gs.TweenFilterLite($target, $duration, $vars));
    } // End of the function
    function initTweenVals($hrp, $reservedProps)
    {
        if ($hrp != true && delay != 0 && gs.TweenLite.overwriteManager.enabled)
        {
            gs.TweenLite.overwriteManager.manageOverwrites(this, gs.TweenLite._all[endTargetID]);
        } // end if
        _clrsa = [];
        _filters = [];
        _matrix = gs.TweenFilterLite._idMatrix.slice();
        $reservedProps = $reservedProps || "";
        $reservedProps = $reservedProps + " blurFilter glowFilter colorMatrixFilter dropShadowFilter bevelFilter ";
        if (typeof(target) == "movieclip" || target instanceof TextField)
        {
            var _loc5;
            var _loc4;
            if (vars.blurFilter != undefined)
            {
                _loc4 = vars.blurFilter;
                this.addFilter("blurFilter", _loc4, flash.filters.BlurFilter, ["blurX", "blurY", "quality"], new flash.filters.BlurFilter(0, 0, _loc4.quality || 2));
            } // end if
            if (vars.glowFilter != undefined)
            {
                _loc4 = vars.glowFilter;
                this.addFilter("glowFilter", _loc4, flash.filters.GlowFilter, ["alpha", "blurX", "blurY", "color", "quality", "strength", "inner", "knockout"], new flash.filters.GlowFilter(16777215, 0, 0, 0, _loc4.strength || 1, _loc4.quality || 2, _loc4.inner, _loc4.knockout));
            } // end if
            if (vars.colorMatrixFilter != undefined)
            {
                _loc4 = vars.colorMatrixFilter;
                var _loc12 = this.addFilter("colorMatrixFilter", _loc4, flash.filters.ColorMatrixFilter, [], new flash.filters.ColorMatrixFilter(_matrix));
                _cmf = _loc12.filter;
                _matrix = _cmf.matrix;
                if (_loc4.matrix != undefined && _loc4.matrix instanceof Array)
                {
                    _endMatrix = _loc4.matrix;
                }
                else
                {
                    if (_loc4.relative == true)
                    {
                        _endMatrix = _matrix.slice();
                    }
                    else
                    {
                        _endMatrix = gs.TweenFilterLite._idMatrix.slice();
                    } // end else if
                    _endMatrix = gs.TweenFilterLite.setBrightness(_endMatrix, _loc4.brightness);
                    _endMatrix = gs.TweenFilterLite.setContrast(_endMatrix, _loc4.contrast);
                    _endMatrix = gs.TweenFilterLite.setHue(_endMatrix, _loc4.hue);
                    _endMatrix = gs.TweenFilterLite.setSaturation(_endMatrix, _loc4.saturation);
                    _endMatrix = gs.TweenFilterLite.setThreshold(_endMatrix, _loc4.threshold);
                    if (!isNaN(_loc4.colorize))
                    {
                        _endMatrix = gs.TweenFilterLite.colorize(_endMatrix, _loc4.colorize, _loc4.amount);
                    }
                    else if (!isNaN(_loc4.color))
                    {
                        _endMatrix = gs.TweenFilterLite.colorize(_endMatrix, _loc4.color, _loc4.amount);
                    } // end else if
                } // end else if
                for (var _loc5 = 0; _loc5 < _endMatrix.length; ++_loc5)
                {
                    if (_matrix[_loc5] != _endMatrix[_loc5] && _matrix[_loc5] != undefined)
                    {
                        tweens[tweens.length] = {o: _matrix, p: _loc5.toString(), s: _matrix[_loc5], c: _endMatrix[_loc5] - _matrix[_loc5], name: "colorMatrixFilter"};
                    } // end if
                } // end of for
            } // end if
            if (vars.dropShadowFilter != undefined)
            {
                _loc4 = vars.dropShadowFilter;
                this.addFilter("dropShadowFilter", _loc4, flash.filters.DropShadowFilter, ["alpha", "angle", "blurX", "blurY", "color", "distance", "quality", "strength", "inner", "knockout", "hideObject"], new flash.filters.DropShadowFilter(0, 45, 0, 0, 0, 0, 1, _loc4.quality || 2, _loc4.inner, _loc4.knockout, _loc4.hideObject));
            } // end if
            if (vars.bevelFilter != undefined)
            {
                _loc4 = vars.bevelFilter;
                this.addFilter("bevelFilter", _loc4, flash.filters.BevelFilter, ["angle", "blurX", "blurY", "distance", "highlightAlpha", "highlightColor", "quality", "shadowAlpha", "shadowColor", "strength"], new flash.filters.BevelFilter(0, 0, 16777215, 0.500000, 0, 0.500000, 2, 2, 0, _loc4.quality || 2));
            } // end if
            if (vars.runBackwards == true)
            {
                var _loc3;
                for (var _loc5 = 0; _loc5 < _clrsa.length; ++_loc5)
                {
                    _loc3 = _clrsa[_loc5];
                    _loc3.sr = _loc3.sr + _loc3.cr;
                    _loc3.cr = _loc3.cr * -1;
                    _loc3.sg = _loc3.sg + _loc3.cg;
                    _loc3.cg = _loc3.cg * -1;
                    _loc3.sb = _loc3.sb + _loc3.cb;
                    _loc3.cb = _loc3.cb * -1;
                    _loc3.f[_loc3.p] = _loc3.sr << 16 | _loc3.sg << 8 | _loc3.sb;
                } // end of for
            } // end if
            super.initTweenVals(true, $reservedProps);
        }
        else
        {
            super.initTweenVals($hrp, $reservedProps);
        } // end else if
    } // End of the function
    function addFilter($name, $fv, $filterType, $props, $defaultFilter)
    {
        var _loc3 = {type: $filterType, name: $name};
        var _loc8 = target.filters;
        var _loc6;
        var _loc2;
        var _loc9;
        var _loc4;
        var _loc7;
        for (var _loc6 = 0; _loc6 < _loc8.length; ++_loc6)
        {
            if (_loc8[_loc6] instanceof $filterType)
            {
                _loc3.filter = _loc8[_loc6];
                break;
            } // end if
        } // end of for
        if (_loc3.filter == undefined)
        {
            _loc3.filter = $defaultFilter;
            _loc8[_loc8.length] = _loc3.filter;
            target.filters = _loc8;
        } // end if
        for (var _loc6 = 0; _loc6 < $props.length; ++_loc6)
        {
            _loc2 = $props[_loc6];
            if ($fv[_loc2] != undefined)
            {
                if (_loc2 == "color" || _loc2 == "highlightColor" || _loc2 == "shadowColor")
                {
                    _loc4 = this.HEXtoRGB(_loc3.filter[_loc2]);
                    _loc7 = this.HEXtoRGB($fv[_loc2]);
                    _clrsa[_clrsa.length] = {f: _loc3.filter, p: _loc2, sr: _loc4.rb, cr: _loc7.rb - _loc4.rb, sg: _loc4.gb, cg: _loc7.gb - _loc4.gb, sb: _loc4.bb, cb: _loc7.bb - _loc4.bb};
                    continue;
                } // end if
                if (_loc2 == "quality" || _loc2 == "inner" || _loc2 == "knockout" || _loc2 == "hideObject")
                {
                    _loc3.filter[_loc2] = $fv[_loc2];
                    continue;
                } // end if
                if (typeof($fv[_loc2]) == "number")
                {
                    _loc9 = $fv[_loc2] - _loc3.filter[_loc2];
                }
                else
                {
                    _loc9 = Number($fv[_loc2]);
                } // end else if
                tweens[tweens.length] = {o: _loc3.filter, p: _loc2, s: _loc3.filter[_loc2], c: _loc9, name: $name};
            } // end if
        } // end of for
        _filters[_filters.length] = _loc3;
        _hf = true;
        return (_loc3);
    } // End of the function
    function render($t)
    {
        var _loc10 = ($t - startTime) / 1000 * _timeScale;
        var _loc6;
        var _loc2;
        var _loc5;
        if (_loc10 >= duration)
        {
            _loc10 = duration;
            _loc6 = _originalEase == vars.ease || duration == 0.001000 ? (1) : (0);
        }
        else
        {
            _loc6 = vars.ease(_loc10, 0, 1, duration);
        } // end else if
        for (var _loc5 = tweens.length - 1; _loc5 > -1; --_loc5)
        {
            _loc2 = tweens[_loc5];
            _loc2.o[_loc2.p] = _loc2.s + _loc6 * _loc2.c;
        } // end of for
        if (_hf)
        {
            var _loc3;
            var _loc8;
            var _loc7;
            var _loc9;
            for (var _loc5 = _clrsa.length - 1; _loc5 > -1; --_loc5)
            {
                _loc2 = _clrsa[_loc5];
                _loc8 = _loc2.sr + _loc6 * _loc2.cr;
                _loc7 = _loc2.sg + _loc6 * _loc2.cg;
                _loc9 = _loc2.sb + _loc6 * _loc2.cb;
                _loc2.f[_loc2.p] = _loc8 << 16 | _loc7 << 8 | _loc9;
            } // end of for
            if (_cmf)
            {
                _cmf.matrix = _matrix;
            } // end if
            var _loc4 = target.filters;
            for (var _loc5 = 0; _loc5 < _filters.length; ++_loc5)
            {
                for (var _loc3 = _loc4.length - 1; _loc3 > -1; --_loc3)
                {
                    if (_loc4[_loc3] instanceof _filters[_loc5].type)
                    {
                        _loc4.splice(_loc3, 1, _filters[_loc5].filter);
                        break;
                    } // end if
                } // end of for
            } // end of for
            target.filters = _loc4;
        } // end if
        if (_hst)
        {
            for (var _loc5 = _subTweens.length - 1; _loc5 > -1; --_loc5)
            {
                _subTweens[_loc5].proxy(_subTweens[_loc5]);
            } // end of for
        } // end if
        if (_hasUpdate)
        {
            vars.onUpdate.apply(vars.onUpdateScope, vars.onUpdateParams);
        } // end if
        if (_loc10 == duration)
        {
            this.complete(true);
        } // end if
    } // End of the function
    function killVars($vars)
    {
        if (gs.TweenLite.overwriteManager.enabled)
        {
            gs.TweenLite.overwriteManager.killVars($vars, vars, tweens, _subTweens, _filters);
        } // end if
    } // End of the function
    static function setGlobalTimeScale($scale)
    {
        if ($scale < 0.000010)
        {
            $scale = 0.000010;
        } // end if
        var _loc3 = $scale / gs.TweenFilterLite._globalTimeScale;
        var _loc2 = gs.TweenLite._all;
        var _loc5;
        var _loc1;
        var _loc4;
        _globalTimeScale = $scale;
        for (var _loc5 in _loc2)
        {
            for (var _loc4 in _loc2[_loc5])
            {
                _loc1 = _loc2[_loc5][_loc4];
                if (_loc1 instanceof gs.TweenFilterLite)
                {
                    _loc1.timeScale = _loc1.timeScale * _loc3;
                } // end if
            } // end of for...in
        } // end of for...in
    } // End of the function
    function HEXtoRGB($n)
    {
        return ({rb: $n >> 16, gb: $n >> 8 & 255, bb: $n & 255});
    } // End of the function
    static function colorize($m, $color, $amount)
    {
        if ($color == undefined || isNaN($color))
        {
            return ($m);
        } // end if
        if ($amount == undefined)
        {
            $amount = 1;
        } // end if
        var _loc4 = ($color >> 16 & 255) / 255;
        var _loc2 = ($color >> 8 & 255) / 255;
        var _loc5 = ($color & 255) / 255;
        var _loc3 = 1 - $amount;
        var _loc7 = [_loc3 + $amount * _loc4 * gs.TweenFilterLite._lumR, $amount * _loc4 * gs.TweenFilterLite._lumG, $amount * _loc4 * gs.TweenFilterLite._lumB, 0, 0, $amount * _loc2 * gs.TweenFilterLite._lumR, _loc3 + $amount * _loc2 * gs.TweenFilterLite._lumG, $amount * _loc2 * gs.TweenFilterLite._lumB, 0, 0, $amount * _loc5 * gs.TweenFilterLite._lumR, $amount * _loc5 * gs.TweenFilterLite._lumG, _loc3 + $amount * _loc5 * gs.TweenFilterLite._lumB, 0, 0, 0, 0, 0, 1, 0];
        return (gs.TweenFilterLite.applyMatrix(_loc7, $m));
    } // End of the function
    static function setThreshold($m, $n)
    {
        if ($n == undefined || isNaN($n))
        {
            return ($m);
        } // end if
        var _loc2 = [gs.TweenFilterLite._lumR * 256, gs.TweenFilterLite._lumG * 256, gs.TweenFilterLite._lumB * 256, 0, -256 * $n, gs.TweenFilterLite._lumR * 256, gs.TweenFilterLite._lumG * 256, gs.TweenFilterLite._lumB * 256, 0, -256 * $n, gs.TweenFilterLite._lumR * 256, gs.TweenFilterLite._lumG * 256, gs.TweenFilterLite._lumB * 256, 0, -256 * $n, 0, 0, 0, 1, 0];
        return (gs.TweenFilterLite.applyMatrix(_loc2, $m));
    } // End of the function
    static function setHue($m, $n)
    {
        if ($n == undefined || isNaN($n))
        {
            return ($m);
        } // end if
        $n = $n * 0.017453;
        var _loc2 = Math.cos($n);
        var _loc1 = Math.sin($n);
        var _loc4 = [gs.TweenFilterLite._lumR + _loc2 * (1 - gs.TweenFilterLite._lumR) + _loc1 * -gs.TweenFilterLite._lumR, gs.TweenFilterLite._lumG + _loc2 * -gs.TweenFilterLite._lumG + _loc1 * -gs.TweenFilterLite._lumG, gs.TweenFilterLite._lumB + _loc2 * -gs.TweenFilterLite._lumB + _loc1 * (1 - gs.TweenFilterLite._lumB), 0, 0, gs.TweenFilterLite._lumR + _loc2 * -gs.TweenFilterLite._lumR + _loc1 * 0.143000, gs.TweenFilterLite._lumG + _loc2 * (1 - gs.TweenFilterLite._lumG) + _loc1 * 0.140000, gs.TweenFilterLite._lumB + _loc2 * -gs.TweenFilterLite._lumB + _loc1 * -0.283000, 0, 0, gs.TweenFilterLite._lumR + _loc2 * -gs.TweenFilterLite._lumR + _loc1 * -(1 - gs.TweenFilterLite._lumR), gs.TweenFilterLite._lumG + _loc2 * -gs.TweenFilterLite._lumG + _loc1 * gs.TweenFilterLite._lumG, gs.TweenFilterLite._lumB + _loc2 * (1 - gs.TweenFilterLite._lumB) + _loc1 * gs.TweenFilterLite._lumB, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
        return (gs.TweenFilterLite.applyMatrix(_loc4, $m));
    } // End of the function
    static function setBrightness($m, $n)
    {
        if ($n == undefined || isNaN($n))
        {
            return ($m);
        } // end if
        $n = $n * 100 - 100;
        return (gs.TweenFilterLite.applyMatrix([1, 0, 0, 0, $n, 0, 1, 0, 0, $n, 0, 0, 1, 0, $n, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], $m));
    } // End of the function
    static function setSaturation($m, $n)
    {
        if ($n == undefined || isNaN($n))
        {
            return ($m);
        } // end if
        var _loc3 = 1 - $n;
        var _loc4 = _loc3 * gs.TweenFilterLite._lumR;
        var _loc2 = _loc3 * gs.TweenFilterLite._lumG;
        var _loc5 = _loc3 * gs.TweenFilterLite._lumB;
        var _loc6 = [_loc4 + $n, _loc2, _loc5, 0, 0, _loc4, _loc2 + $n, _loc5, 0, 0, _loc4, _loc2, _loc5 + $n, 0, 0, 0, 0, 0, 1, 0];
        return (gs.TweenFilterLite.applyMatrix(_loc6, $m));
    } // End of the function
    static function setContrast($m, $n)
    {
        if ($n == undefined || isNaN($n))
        {
            return ($m);
        } // end if
        $n = $n + 0.010000;
        var _loc2 = [$n, 0, 0, 0, 128 * (1 - $n), 0, $n, 0, 0, 128 * (1 - $n), 0, 0, $n, 0, 128 * (1 - $n), 0, 0, 0, 1, 0];
        return (gs.TweenFilterLite.applyMatrix(_loc2, $m));
    } // End of the function
    static function applyMatrix($m, $m2)
    {
        if ($m == undefined || !($m instanceof Array) || $m2 == undefined || !($m2 instanceof Array))
        {
            return ($m2);
        } // end if
        var _loc7 = [];
        var _loc2 = 0;
        var _loc5 = 0;
        var _loc6;
        var _loc1;
        for (var _loc6 = 0; _loc6 < 4; ++_loc6)
        {
            for (var _loc1 = 0; _loc1 < 5; ++_loc1)
            {
                if (_loc1 == 4)
                {
                    _loc5 = $m[_loc2 + 4];
                }
                else
                {
                    _loc5 = 0;
                } // end else if
                _loc7[_loc2 + _loc1] = $m[_loc2] * $m2[_loc1] + $m[_loc2 + 1] * $m2[_loc1 + 5] + $m[_loc2 + 2] * $m2[_loc1 + 10] + $m[_loc2 + 3] * $m2[_loc1 + 15] + _loc5;
            } // end of for
            _loc2 = _loc2 + 5;
        } // end of for
        return (_loc7);
    } // End of the function
    function get timeScale()
    {
        return (_timeScale / gs.TweenFilterLite._globalTimeScale);
    } // End of the function
    function set timeScale($n)
    {
        if ($n < 0.000010)
        {
            $n = 0.000010;
        }
        else
        {
            $n = $n * gs.TweenFilterLite._globalTimeScale;
        } // end else if
        initTime = gs.TweenLite._curTime - (gs.TweenLite._curTime - initTime - delay * (1000 / _timeScale)) * _timeScale * (1 / $n) - delay * (1000 / $n);
        if (startTime != 100000000000.000000)
        {
            startTime = initTime + delay * (1000 / $n);
        } // end if
        _timeScale = $n;
        null;
        //return (this.timeScale());
        null;
    } // End of the function
    static function set globalTimeScale($n)
    {
        gs.TweenFilterLite.setGlobalTimeScale($n);
        null;
        //return (gs.TweenFilterLite.globalTimeScale());
        null;
    } // End of the function
    static function get globalTimeScale()
    {
        return (gs.TweenFilterLite._globalTimeScale);
    } // End of the function
    static var version = 8.200000;
    static var delayedCall = gs.TweenLite.delayedCall;
    static var killTweensOf = gs.TweenLite.killTweensOf;
    static var killDelayedCallsTo = gs.TweenLite.killTweensOf;
    static var _globalTimeScale = 1;
    static var _idMatrix = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
    static var _lumR = 0.212671;
    static var _lumG = 0.715160;
    static var _lumB = 0.072169;
    var _hf = false;
} // End of Class
#endinitclip
